package cn.iocoder.yudao.module.scrm.controller.admin.schedules.vo;

import cn.iocoder.yudao.module.scrm.annotations.FieldRepeatValidator;
import cn.iocoder.yudao.module.scrm.annotations.FieldRepeatValidators;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;

@Schema(description = "管理后台 - 排期访客新增/修改 Request VO")
@Data
@FieldRepeatValidators(tableName = "scrm_schedules_visitor",idField = "id",fieldRepeatValidators = {
        //@FieldRepeatValidator(field = "name", property = "name",message = "姓名已经存在！"),
        @FieldRepeatValidator(field = "phone", property = "phone",type = "1",ifFieldNullValue = "1",
                            foreignKeyField = "schedules_id",foreignKeyProperty = "schedulesId",message = "手机号码不能重复！")
})
public class SchedulesVisitorSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8558")
    private Long id;

    @Schema(description = "姓名", example = "李四")
    private String name;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "企业")
    private String enterprise;

    @Schema(description = "邀约人姓名")
    private String inviter;

    @Schema(description = "排期ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6350")
    @NotNull(message = "排期ID不能为空")
    private Long schedulesId;


}